home *** CD-ROM | disk | FTP | other *** search
- class Front extends MovieClip
- {
- var btnPlay;
- var btnQuote;
- var btnKerb;
- var oKeyList;
- function Front(Void)
- {
- super();
- this.setButtons();
- }
- function setButtons(Void)
- {
- this.btnPlay.onRelease = mx.utils.Delegate.create(this,this.onReleasePlay);
- this.btnQuote.onRelease = mx.utils.Delegate.create(this,this.onReleaseQuote);
- this.btnKerb.onRelease = mx.utils.Delegate.create(this,this.onReleaseKerb);
- this.oKeyList = new Object();
- this.oKeyList.onKeyDown = mx.utils.Delegate.create(this,this.onPressSpace);
- Key.addListener(this.oKeyList);
- }
- function onReleasePlay(Void)
- {
- Key.removeListener(this.oKeyList);
- _root.gotoAndStop("game");
- }
- function onReleaseQuote(Void)
- {
- this.getURL("http://www.easymoneyinsurance.com","_blank");
- }
- function onReleaseKerb(Void)
- {
- this.getURL("http://www.kerb.co.uk","_blank");
- }
- function onPressSpace(Void)
- {
- if(Key.isDown(32))
- {
- this.onReleasePlay();
- }
- }
- }
-